Skip to content

test: unskip sm-core integ tests#5856

Open
lucasjia-aws wants to merge 8 commits into
aws:masterfrom
lucasjia-aws:unskip-integ-tests-core
Open

test: unskip sm-core integ tests#5856
lucasjia-aws wants to merge 8 commits into
aws:masterfrom
lucasjia-aws:unskip-integ-tests-core

Conversation

@lucasjia-aws
Copy link
Copy Markdown
Collaborator

@lucasjia-aws lucasjia-aws commented May 14, 2026

Description

This PR audits and unskips integration tests in sagemaker-core as part of COE AI4 (skipped test audit). Each previously-skipped test was investigated for necessity, root cause of skip, and fixed where possible.

Summary of Changes

Test Status Commit Fix Description
test_retrieve_image_uri_intelligent_default Fixed & Unskipped 28c168e3, 533f3c6a, b17f7b7f Fixed 3 bugs in ImageRetriever: (1) replaced ineffective locals() assignment with args dict, (2) added missing PYTHON_SDK in config path, (3) used PascalCase (_to_pascal_case) for config key lookup. Updated expected image version from 3.0.0 to 3.2.0.
test_advanced_job_setting Fixed & Unskipped a1e0e17e Ported kms_utils.py from SageMakerHulkPythonSDK with get_or_create_kms_key utility, adapted for sagemaker-core import paths. Uncommented the import in test file.
test_decorator_with_spark_job Conditionally Skipped 6aa560bc Fixed test code bugs (set→dict, attribute→string). Added @pytest.mark.skipif for Python != 3.9 or 3.12 -- SageMaker Spark image only available for Python 3.9 and 3.12
test_decorator_auto_capture Unskipped (passes) 5a914837 Was unnecessarily skipped. Passes in CI without changes.

Tests that remain skipped (with justification)

Test Reason
test_decorator_with_spark_job Spark container (sagemaker-spark-processing:3.3-cpu-py39-v1) does not have a working pip in PATH. SDK auto-injects pip install sagemaker-feature-store-pyspark as a pre-exec command which fails. Requires Spark container image update. Conditionally skipped with @pytest.mark.skipif so it auto-enables when run on py39 with a fixed container.

Testing

  • Ran full sagemaker-core integ test suite via CodeBuild
  • Individually verified test_decorator_with_spark_job on py39 and py312 to confirm root cause
  • Verified CI role has required KMS permissions for test_advanced_job_setting

@lucasjia-aws lucasjia-aws force-pushed the unskip-integ-tests-core branch from 4147d4a to 076b890 Compare May 14, 2026 18:32
@lucasjia-aws lucasjia-aws force-pushed the unskip-integ-tests-core branch from 67d18ca to 24fcdac Compare May 15, 2026 22:07
@lucasjia-aws lucasjia-aws force-pushed the unskip-integ-tests-core branch from 24fcdac to b17f7b7 Compare May 18, 2026 21:06
@lucasjia-aws lucasjia-aws force-pushed the unskip-integ-tests-core branch from c8108c7 to 6aa560b Compare May 19, 2026 16:44
…ineffective locals() assignment with args dict
…ced_job_setting

- Add tests/integ/kms_utils.py with get_or_create_kms_key utility ported
  from SageMakerHulkPythonSDK, adapted for sagemaker-core import paths
- Uncomment kms_utils import in test_decorator.py to fix NameError in
  s3_kms_key fixture
… fix test bugs

- Add skipif for Python versions without Spark image (only 3.9/3.12 supported)
- Fix Properties set literal to dict: {"spark.app.name": "remote-spark-test"}
- Fix spark.conf.get() to use string key instead of attribute reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant